package org.example.controller;

import org.example.entities.User;
import org.example.service.UserService2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController2 {

    @Autowired
   UserService2 userService2;

    @GetMapping("/getUserList2")
    public List<User> getUserList(){
        List<User> list =userService2.getUserList() ;
        return list;
    }

}
